﻿﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Xml.Serialization;
using Fcdbas.Core;
using Fcdbas.Core.Configuration;
using Fcdbas.Core.DataAccess;


namespace Fcdbas.Biz
{
    /// <summary></summary>
    [Serializable]
    [DataObject]
    [Description("")]
    [BindTable("fnd_language_sys", Description = "", ConnName = "", DbType = DatabaseType.MySql)]
    public class fnd_language_sys : Entity<fnd_language_sys>,Ifnd_language_sys
    {
        #region 属性
 
        private String _main_type;

        /// <summary></summary>
        [DisplayName("Type1")]
        [Description("")]
        [DataObjectField(false, false, false, 50)]
        [BindColumn(1, "main_type",  null, "varchar(50)", 0, 0, false)]

        public virtual String main_type

        {
            get { return _main_type; }
            set { if (OnPropertyChanging(__.main_type, value)) { _main_type = value; OnPropertyChanged(__.main_type); } }
        }

 
        private String _type;

        /// <summary></summary>
        [DisplayName("Type")]
        [Description("")]
        [DataObjectField(false, false, false, 50)]
        [BindColumn(2, "type",  null, "varchar(50)", 0, 0, false)]

        public virtual String type

        {
            get { return _type; }
            set { if (OnPropertyChanging(__.type, value)) { _type = value; OnPropertyChanged(__.type); } }
        }

 
        private String _path;

        /// <summary></summary>
        [DisplayName("Path")]
        [Description("")]
        [DataObjectField(false, false, false, 200)]
        [BindColumn(3, "path",  null, "varchar(200)", 0, 0, false)]

        public virtual String path

        {
            get { return _path; }
            set { if (OnPropertyChanging(__.path, value)) { _path = value; OnPropertyChanged(__.path); } }
        }

 
        private String _attribute;

        /// <summary></summary>
        [DisplayName("Attribute")]
        [Description("")]
        [DataObjectField(false, false, false, 100)]
        [BindColumn(4, "attribute",  null, "varchar(100)", 0, 0, false)]

        public virtual String attribute

        {
            get { return _attribute; }
            set { if (OnPropertyChanging(__.attribute, value)) { _attribute = value; OnPropertyChanged(__.attribute); } }
        }

 
        private String _lang_code;

        /// <summary></summary>
        [DisplayName("Code")]
        [Description("")]
        [DataObjectField(false, false, false, 3)]
        [BindColumn(5, "lang_code",  null, "varchar(3)", 0, 0, false)]

        public virtual String lang_code

        {
            get { return _lang_code; }
            set { if (OnPropertyChanging(__.lang_code, value)) { _lang_code = value; OnPropertyChanged(__.lang_code); } }
        }

 
        private String _module;

        /// <summary></summary>
        [DisplayName("Module")]
        [Description("")]
        [DataObjectField(false, false, true, 10)]
        [BindColumn(6, "module",  null, "varchar(10)", 0, 0, false)]

        public virtual String module

        {
            get { return _module; }
            set { if (OnPropertyChanging(__.module, value)) { _module = value; OnPropertyChanged(__.module); } }
        }

 
        private String _prog_text;

        /// <summary></summary>
        [DisplayName("Text")]
        [Description("")]
        [DataObjectField(false, false, true, 200)]
        [BindColumn(7, "prog_text",  null, "varchar(200)", 0, 0, false)]

        public virtual String prog_text

        {
            get { return _prog_text; }
            set { if (OnPropertyChanging(__.prog_text, value)) { _prog_text = value; OnPropertyChanged(__.prog_text); } }
        }

 
        private String _lang_text;

        /// <summary></summary>
        [DisplayName("Text1")]
        [Description("")]
        [DataObjectField(false, false, true, 200)]
        [BindColumn(8, "lang_text",  null, "varchar(200)", 0, 0, false)]

        public virtual String lang_text

        {
            get { return _lang_text; }
            set { if (OnPropertyChanging(__.lang_text, value)) { _lang_text = value; OnPropertyChanged(__.lang_text); } }
        }

 
        private String _status_text;

        /// <summary></summary>
        [DisplayName("Text2")]
        [Description("")]
        [DataObjectField(false, false, true, 200)]
        [BindColumn(9, "status_text",  null, "varchar(200)", 0, 0, false)]

        public virtual String status_text

        {
            get { return _status_text; }
            set { if (OnPropertyChanging(__.status_text, value)) { _status_text = value; OnPropertyChanged(__.status_text); } }
        }

 
        private String _display_text;

        /// <summary></summary>
        [DisplayName("Text3")]
        [Description("")]
        [DataObjectField(false, false, true, 200)]
        [BindColumn(10, "display_text",  null, "varchar(200)", 0, 0, false)]

        public virtual String display_text

        {
            get { return _display_text; }
            set { if (OnPropertyChanging(__.display_text, value)) { _display_text = value; OnPropertyChanged(__.display_text); } }
        }

 
        private String _system_defined;

        /// <summary></summary>
        [DisplayName("Defined")]
        [Description("")]
        [DataObjectField(false, false, true, 5)]
        [BindColumn(11, "system_defined",  null, "varchar(5)", 0, 0, false)]

        public virtual String system_defined

        {
            get { return _system_defined; }
            set { if (OnPropertyChanging(__.system_defined, value)) { _system_defined = value; OnPropertyChanged(__.system_defined); } }
        }

 
        private String _objid;

        /// <summary></summary>
        [DisplayName("Objid")]
        [Description("")]
        [DataObjectField(false, false, false, 50)]
        [BindColumn(12, "objid",  null, "varchar(50)", 0, 0, false)]

        public virtual String objid

        {
            get { return _objid; }
            set { if (OnPropertyChanging(__.objid, value)) { _objid = value; OnPropertyChanged(__.objid); } }
        }

 
        private String _objversion;

        /// <summary></summary>
        [DisplayName("Objversion")]
        [Description("")]
        [DataObjectField(false, false, true, 24)]
        [BindColumn(13, "objversion",  null, "varchar(24)", 0, 0, false)]

        public virtual String objversion

        {
            get { return _objversion; }
            set { if (OnPropertyChanging(__.objversion, value)) { _objversion = value; OnPropertyChanged(__.objversion); } }
        }
        #endregion

        #region 获取/设置 字段值
        /// <summary>
        /// 获取/设置 字段值。
        /// 一个索引，基类使用反射实现。
        /// 派生实体类可重写该索引，以避免反射带来的性能损耗
        /// </summary>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        public override Object this[String name]
        {
            get
            {
                switch (name)
                {
                    case __.main_type : return _main_type;
                    case __.type : return _type;
                    case __.path : return _path;
                    case __.attribute : return _attribute;
                    case __.lang_code : return _lang_code;
                    case __.module : return _module;
                    case __.prog_text : return _prog_text;
                    case __.lang_text : return _lang_text;
                    case __.status_text : return _status_text;
                    case __.display_text : return _display_text;
                    case __.system_defined : return _system_defined;
                    case __.objid : return _objid;
                    case __.objversion : return _objversion;
                    default: return base[name];
                }
            }
            set
            {
                switch (name)
                {
                    case __.main_type : 
                        if(value != null)
                            _main_type = Convert.ToString(value);
                        else
                            _main_type = null;
                    break;
                    case __.type : 
                        if(value != null)
                            _type = Convert.ToString(value);
                        else
                            _type = null;
                    break;
                    case __.path : 
                        if(value != null)
                            _path = Convert.ToString(value);
                        else
                            _path = null;
                    break;
                    case __.attribute : 
                        if(value != null)
                            _attribute = Convert.ToString(value);
                        else
                            _attribute = null;
                    break;
                    case __.lang_code : 
                        if(value != null)
                            _lang_code = Convert.ToString(value);
                        else
                            _lang_code = null;
                    break;
                    case __.module : 
                        if(value != null)
                            _module = Convert.ToString(value);
                        else
                            _module = null;
                    break;
                    case __.prog_text : 
                        if(value != null)
                            _prog_text = Convert.ToString(value);
                        else
                            _prog_text = null;
                    break;
                    case __.lang_text : 
                        if(value != null)
                            _lang_text = Convert.ToString(value);
                        else
                            _lang_text = null;
                    break;
                    case __.status_text : 
                        if(value != null)
                            _status_text = Convert.ToString(value);
                        else
                            _status_text = null;
                    break;
                    case __.display_text : 
                        if(value != null)
                            _display_text = Convert.ToString(value);
                        else
                            _display_text = null;
                    break;
                    case __.system_defined : 
                        if(value != null)
                            _system_defined = Convert.ToString(value);
                        else
                            _system_defined = null;
                    break;
                    case __.objid : 
                        if(value != null)
                            _objid = Convert.ToString(value);
                        else
                            _objid = null;
                    break;
                    case __.objversion : 
                        if(value != null)
                            _objversion = Convert.ToString(value);
                        else
                            _objversion = null;
                    break;
                    default: base[name] = value; break;
                }
            }
        }
        #endregion

        #region 字段名
        /// <summary>取得字段信息的快捷方式</summary>
        public class _
        {
            ///<summary></summary>
            public static readonly Field main_type = FindByName(__.main_type);

            ///<summary></summary>
            public static readonly Field type = FindByName(__.type);

            ///<summary></summary>
            public static readonly Field path = FindByName(__.path);

            ///<summary></summary>
            public static readonly Field attribute = FindByName(__.attribute);

            ///<summary></summary>
            public static readonly Field lang_code = FindByName(__.lang_code);

            ///<summary></summary>
            public static readonly Field module = FindByName(__.module);

            ///<summary></summary>
            public static readonly Field prog_text = FindByName(__.prog_text);

            ///<summary></summary>
            public static readonly Field lang_text = FindByName(__.lang_text);

            ///<summary></summary>
            public static readonly Field status_text = FindByName(__.status_text);

            ///<summary></summary>
            public static readonly Field display_text = FindByName(__.display_text);

            ///<summary></summary>
            public static readonly Field system_defined = FindByName(__.system_defined);

            ///<summary></summary>
            public static readonly Field objid = FindByName(__.objid);

            ///<summary></summary>
            public static readonly Field objversion = FindByName(__.objversion);

            static Field FindByName(String name) { return Meta.Table.FindByName(name); }
        }

        /// <summary>取得字段名称的快捷方式</summary>
        class __
        {
            ///<summary></summary>
            public const String main_type = "main_type";

            ///<summary></summary>
            public const String type = "type";

            ///<summary></summary>
            public const String path = "path";

            ///<summary></summary>
            public const String attribute = "attribute";

            ///<summary></summary>
            public const String lang_code = "lang_code";

            ///<summary></summary>
            public const String module = "module";

            ///<summary></summary>
            public const String prog_text = "prog_text";

            ///<summary></summary>
            public const String lang_text = "lang_text";

            ///<summary></summary>
            public const String status_text = "status_text";

            ///<summary></summary>
            public const String display_text = "display_text";

            ///<summary></summary>
            public const String system_defined = "system_defined";

            ///<summary></summary>
            public const String objid = "objid";

            ///<summary></summary>
            public const String objversion = "objversion";

        }
        #endregion
    }

    /// <summary>接口</summary>
    public partial interface Ifnd_language_sys
    {
       #region 属性
        /// <summary></summary>

        String main_type { get; set; }


        /// <summary></summary>

        String type { get; set; }


        /// <summary></summary>

        String path { get; set; }


        /// <summary></summary>

        String attribute { get; set; }


        /// <summary></summary>

        String lang_code { get; set; }


        /// <summary></summary>

        String module { get; set; }


        /// <summary></summary>

        String prog_text { get; set; }


        /// <summary></summary>

        String lang_text { get; set; }


        /// <summary></summary>

        String status_text { get; set; }


        /// <summary></summary>

        String display_text { get; set; }


        /// <summary></summary>

        String system_defined { get; set; }


        /// <summary></summary>

        String objid { get; set; }


        /// <summary></summary>

        String objversion { get; set; }

        #endregion

        #region 获取/设置 字段值
        /// <summary>获取/设置 字段值。</summary>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        Object this[String name] { get; set; }
        #endregion
    }
}